package com.smedi.ismedi.inmail.api.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.HashSet;

/**
 * 总院发布的通知公告请求
 *
 * @author jiangqinxuan
 * &#064;date  2021/07/27
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "通知公告新增")
public class AnnouncementCreateRequest extends ProcessRequest implements Serializable {
    /**
     * 通知公告标题
     */
    @NotBlank(message = "通知公告标题不能为空！")
    @ApiModelProperty(value = "通知公告标题", example = "假期安全")
    @Size(max = 100, message = "通知公告标题不能超过100字！")
    private String title;

    /**
     * 通知公告简介
     */
    @NotBlank(message = "通知公告简介不能为空！")
    @ApiModelProperty(value = "通知公告简介", example = "临近十一假期，做好假前安全宣讲工作")
    @Size(max = 500, message = "通知公告简介不能超过500字！")
    private String content;

    /**
     * 接收人id列表
     */
    @NotEmpty(message = "接收人id列表不能为空！")
    @ApiModelProperty(value = "接收人id列表")
    private HashSet<Long> receiverIds;

    /**
     * 附件key列表
     */
    @NotEmpty(message = "附件不能为空！")
    @ApiModelProperty(value = "附件key列表")
    private HashSet<String> attachmentKeys;

    /**
     * 是否限内部
     */
    @NotNull(message = "是否限内部不能为空！")
    @ApiModelProperty(value = "是否限内部")
    private Boolean internal;

    /**
     * 通知公告类型
     */
    @NotNull(message = "通知公告类型不能为空！")
    @ApiModelProperty(value = "通知公告类型")
    private String type;
}